package com.neuedu.hrsystem.person.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.neuedu.hrsystem.bean.Dept;
import com.neuedu.hrsystem.person.dao.DeptDao;
import com.neuedu.hrsystem.person.service.DeptService;

@Service
public class DeptServiceImpl implements DeptService {
	
	@Autowired
	private DeptDao deptDao;
	
	public void setDeptDao(DeptDao deptDao) {
		this.deptDao = deptDao;
	}

	@Override
	public List<Dept> findAll() {
		return deptDao.findAll();
	}

	@Override
	public int countDept() {
		return deptDao.countDept();
	}

	@Override
	public int addDept(Dept d) {
		return deptDao.addDept(d);
	}

	@Override
	public int updateDept(Dept d) {
		return deptDao.updateDept(d);
	}

	@Override
	public int deleteDept(int deptno) {
		return deptDao.deleteDept(deptno);
	}

}
